var chat = 
{
  isOdd:true,
  addChatMessage:function(name,txt){
    
     if(chat.isOdd){
       msg = '<div class="odd msg">';
       chat.isOdd = false;
     }else{
       msg = '<div class="msg">';
       chat.isOdd = true;
     }
     msg += '<span class="name">' + name + ": "+ '</span>';
     msg += txt + '</div>';
     var messagesDIV = document.getElementById('text');
     messagesDIV.innerHTML = messagesDIV.innerHTML + msg;
      
   },
setMemberList: function(members, moderator)
   {
      memberList = "";
      for (var i =0; i < members.length; i++)
      {
        if (members[i]){
          if (members[i] == moderator)
          {
            memberList += '<div class="mod">' + members[i] + '</div>';
          }
          else {
            memberList += '<div class="reg">' + members[i] + '</div>';
          }
        }
      }
      list = document.getElementById('list');
      list.innerHTML = memberList;
   }

}
